﻿<sap:ActivityDesigner  Collapsible="False"
    x:Class="Egelke.EHealth.Etee.Crypto.Wf.Design.RecipientsDesigner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="clr-namespace:System;assembly=mscorlib"    
    xmlns:e="clr-namespace:Egelke.EHealth.Etee.Crypto.Wf"
    xmlns:ed="clr-namespace:Egelke.EHealth.Etee.Crypto.Wf.Design"
    xmlns:sap="clr-namespace:System.Activities.Presentation;assembly=System.Activities.Presentation"
    xmlns:sapv="clr-namespace:System.Activities.Presentation.View;assembly=System.Activities.Presentation"
    xmlns:sapc="clr-namespace:System.Activities.Presentation.Converters;assembly=System.Activities.Presentation">
    <sap:ActivityDesigner.Icon>
        <DrawingBrush>
            <DrawingBrush.Drawing>
                <ImageDrawing>
                    <ImageDrawing.Rect>
                        <Rect Location="0,0" Size="16,16" />
                    </ImageDrawing.Rect>
                    <ImageDrawing.ImageSource>
                        <BitmapImage UriSource="Person-Multi.png" />
                    </ImageDrawing.ImageSource>
                </ImageDrawing>
            </DrawingBrush.Drawing>
        </DrawingBrush>
    </sap:ActivityDesigner.Icon>
    <sap:ActivityDesigner.Resources>
        <ResourceDictionary>
            <sapc:ArgumentToExpressionConverter x:Key="ArgumentToExpressionConverter" />
        </ResourceDictionary>
    </sap:ActivityDesigner.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <!--RowDefinition Height="auto" /-->
            <RowDefinition Height="auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="auto" />
            <ColumnDefinition Width="auto" />
        </Grid.ColumnDefinitions>

        <Label Grid.Row="0" Grid.Column="0" Content="Addressed" HorizontalAlignment="Right" />
        <sapv:ExpressionTextBox  Grid.Row="0" Grid.Column="1" 
            Expression="{Binding Path=ModelItem.Addressed, 
                                 Mode=TwoWay, 
                                 Converter={StaticResource ArgumentToExpressionConverter}, 
                                 ConverterParameter=In }"
            ExpressionType="{ed:GSCType}"
            OwnerActivity="{Binding Path=ModelItem}"
            Width="200" />

        <!--
        <Label Grid.Row="1" Grid.Column="0" Content="Unaddressed" HorizontalAlignment="Right" />
        <sapv:ExpressionTextBox  Grid.Row="1" Grid.Column="1" 
            Expression="{Binding Path=ModelItem.UnaddressedAllowed, 
                                 Mode=TwoWay, 
                                 Converter={StaticResource ArgumentToExpressionConverter}, 
                                 ConverterParameter=In }"
            ExpressionType="s:String[]"
            OwnerActivity="{Binding Path=ModelItem}"
            Width="200" />
        -->
        <Label Grid.Row="1" Grid.Column="0" Content="To" HorizontalAlignment="Right" />
        <sapv:ExpressionTextBox Grid.Row="1" Grid.Column="1"
              Expression="{Binding Path=ModelItem.To, 
                                   Mode=TwoWay, 
                                   Converter={StaticResource ArgumentToExpressionConverter}, 
                                   ConverterParameter=Out }"
              OwnerActivity="{Binding Path=ModelItem}"
              ExpressionType="e:Recipients" 
              UseLocationExpression="True" 
              Width="200"
        />

        
        
    </Grid>
</sap:ActivityDesigner>
